<?php
@header('Content-Type: text/html; charset=UTF-8');
?><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo $title?></title>
  <meta name="keywords" content="<?php echo $conf['keywords']?>">
  <meta name="description" content="<?php echo $conf['description']?>">
  <!-- Mobile support -->
  <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="format-detection" content="telephone=no">
  
  <link rel="stylesheet" type="text/css" href="https://yongechan.site/MDcloud/css/waves.min.css" />
  <link rel="stylesheet" type="text/css" href="https://yongechan.site/MDcloud/css/theme.css" />      
  <!-- Bootstrap Material Design -->
  <link href="//cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="//cdn.staticfile.org/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
  <link href="//cdn.staticfile.org/bootstrap-material-design/0.5.10/css/bootstrap-material-design.min.css" rel="stylesheet">
  <link href="//cdn.staticfile.org/bootstrap-material-design/0.5.10/css/ripples.min.css" rel="stylesheet">
  <?php if($is_file){?><link rel="stylesheet" href="//cdn.staticfile.org/aplayer/1.10.1/APlayer.min.css"><link href="assets/css/ckplayer.css" rel="stylesheet"><?php }?>
  <link href="assets/css/style.css?v=<?php echo VERSION?>" rel="stylesheet">
  <!--[if lt IE 9]>
    <script src="//cdn.staticfile.org/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="//cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
  <script type="text/javascript" src="//cdn.staticfile.org/jquery/1.12.4/jquery.min.js"></script>
  <!--MDUI-->
    <link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/mdui@1.0.1/dist/css/mdui.min.css"
      integrity="sha384-cLRrMq39HOZdvE0j6yBojO4+1PrHfB7a9l5qLcmRm/fiWXYY+CndJPmyu5FV/9Tw"
      crossorigin="anonymous"
    />
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
</script>
</head>
<body>
<!-- 右下角MD按钮-->
	<button class="mdui-fab mdui-fab-fixed mdui-ripple mdui-color-theme"mdui-dialog="{target: '#search'} ">
	  <i class="mdui-icon material-icons">search</i>
	</button>
<div class="mdui-container-fluid">
	  <body class="mdui-appbar-with-toolbar mdui-shadow-0 ">
		<!-- 工具栏-->
		<div class="mdui-appbar mdui-appbar-fixed mdui-appbar-inset mdui-shadow-0 mdui-appbar-scroll-hide ">
		  <div class="mdui-toolbar mdui-color-theme ">
			<button class="mdui-btn mdui-btn-icon " mdui-drawer="{target: '#left-drawer'}"><i class="mdui-icon material-icons">menu</i></button>
			<span class="mdui-typo-headline"><?php echo $conf['title']?></span>
			<div class="mdui-toolbar-spacer"></div>
		  </div>
		</div>
		<body class="mdui-drawer-body-left mdui-drawer-body-right">
		  <div class="mdui-container-fluid">
			<div class="mdui-drawer mdui-drawer-close" id="left-drawer">
<ul class="mdui-list">
          <?php if($conf['userlogin']){?>
              <?php if($islogin2){?>
      <li class="mdui-list-item mdui-ripple waves-block radius mdui-color-theme-50"mdui-dialog="{target: '#bye'}">
    <div class="mdui-list-item-content">
      <div class="mdui-list-item-title">欢迎您<strong><?php echo $userrow['nickname']?></strong></div>
      <div class="mdui-list-item-text mdui-list-item-one-line">
        <span class="mdui-text-color-while">单击退出登录</span> 
      </div>
    </div>
  </li>      
     <?php }else{?>
             <li class="mdui-list-item mdui-ripple waves-block radius mdui-color-theme-50 <?php echo checkIfActive('login')?> waves-block radius ">
    <div class="mdui-list-item-content"><a href="./login.php">
      <div class="mdui-list-item-title">未登录</div>
      <div class="mdui-list-item-text mdui-list-item-one-line">
        <span class="mdui-text-color-while">点击登录</span> 
      </div>
    </div>
    </a>
  </li> 
           <?php }?>
            <?php }?>       
  
				<a href="./" class="waves-block radius mdui-list-item mdui-ripple mdui-m-t-1 waves-block radius  <?php echo checkIfActive('index,')?> " >
				  <i class="mdui-list-item-icon mdui-icon material-icons">folder</i>
				  <div class="mdui-list-item-content">文件列表</div>
				</a>
			  <a href="./upload.php" class="waves-block radius mdui-list-item mdui-ripple mdui-m-t-1 waves-block radius <?php echo checkIfActive('upload,')?> " >
				<i class="mdui-list-item-icon mdui-icon material-icons">cloud_upload</i>
				<div class="mdui-list-item-content">文件上传</div>
			  </a>
			  
			  <a href="./?m=mine" class="waves-block radius mdui-list-item mdui-m-t-1  <?php echo checkIfActive('myfile,')?> " >
				<i class="mdui-list-item-icon mdui-icon material-icons">account_circle</i>
				<div class="mdui-list-item-content">我的文件</div>
			  </a>
			  <li class="mdui-subheader">测试性功能</li>
            <a  class=" mdui-ripple  mdui-m-t-1 waves-block radius mdui-list-item  "mdui-dialog="{target: '#setTheme'} " >
				<i class="mdui-list-item-icon mdui-icon material-icons">color_lens</i>
				<div class="mdui-list-item-content">主题切换</div>
			  </a>
			  </ul>
			</div>
		  </div> 
 
  <div
 
  <div class="waves-block radius mdui-dialog mdui-color-theme-50 " id="search">
  <div class="mdui-dialog-title">Search｜搜索</div>
<div class="mdui-textfield mdui-col-md-6  mdui-col-lg-6 ">
<?php if($conf['filesearch']==1){?><span class="searchbox">
   <form class="form-inline" action="./" method="GET"> 
   <?php if(isset($_GET['m'])){?><input name="m" type="hidden" value="<?php echo $_GET['m']?>"><?php }?>
  <input name="kw" class="mdui-textfield-input" type="text" placeholder="搜索" value="<?php echo $kw?>"  />
</div>
  <div class="mdui-dialog-actions">
    <button class="mdui-btn mdui-ripple" >Search</button>
    </form>
        </span><?php }?>
  </div>
</div>

<div class="mdui-dialog mdui-typo mdui-color-theme-50" id="bye">
  <div class="mdui-dialog-title">警告</div>
  <div class="mdui-dialog-content">是否退出登录</div>
  <div class="mdui-dialog-actions">
    <button class="mdui-btn mdui-ripple" mdui-dialog-close>取消</button>
    <button class="mdui-btn mdui-ripple"><a href="./login.php?logout=1">退出登录</a></button>
  </div>
</div>
<!--使用https://burgerstudio.github.io/的代码-->
<script src="https://burgerstudio.github.io/toTop.js"></script>
	<div class="mdui-dialog mdui-color-theme-50" id="setTheme">
        <div class="mdui-toolbar" style="margin-top: 8px;padding-left: 8px;">
           	<span class="mdui-typo-title">调色板</span>
           	<div class="mdui-toolbar-spacer"></div>
        	<div class="waves-circle"><button class="mdui-btn mdui-btn-icon" mdui-dialog-close><i class="mdui-icon material-icons">close</i></button></div>
        </div>
        <div class="mdui-dialog-content">
            <p style="font-size: 16px;">夜间模式</p>
            <form>
                <div class="mdui-row-xs-2 mdui-row-sm-3 mdui-row-md-4 mdui-row-lg-5">
					<label class="mdui-radio mdui-col" onclick="setDarkTheme('bySystem');">
    					<input type="radio" name="setDarkTheme" id="setDarkTheme1"/>
    					<i class="mdui-radio-icon"></i>
    					跟随浏览器
  					</label>
                 	<label class="mdui-radio mdui-col" onclick="setDarkTheme('disabled')">
    					<input type="radio" name="setDarkTheme" id="setDarkTheme2"/>
    					<i class="mdui-radio-icon"></i>
    					关闭
  					</label>
                 	<label class="mdui-radio mdui-col" onclick="setDarkTheme('enabled');">
    					<input type="radio" name="setDarkTheme" id="setDarkTheme3"/>
    					<i class="mdui-radio-icon"></i>
    					开启
  					</label>
                 	<label class="mdui-radio mdui-col" onclick="setDarkTheme('byTime')">
    					<input type="radio" name="setDarkTheme" id="setDarkTheme4"/>
    					<i class="mdui-radio-icon"></i>
    					基于时间
  					</label>
				</div>
            </form>
            <p style="font-size: 16px;">主色</p>
            <form>
            	<div class="mdui-row-xs-2 mdui-row-sm-3 mdui-row-md-4 mdui-row-lg-5">
               		<label class="mdui-radio mdui-col mdui-text-color-red" onclick="setPrimaryTheme('red')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemered"/>
    					<i class="mdui-radio-icon"></i>
    					Red
  					</label>
                 	<label class="mdui-radio mdui-col mdui-text-color-pink" onclick="setPrimaryTheme('pink')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemepink"/>
    					<i class="mdui-radio-icon"></i>
    					Pink
  					</label>
                 	<label class="mdui-radio mdui-col mdui-text-color-purple" onclick="setPrimaryTheme('purple')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemepurple"/>
    					<i class="mdui-radio-icon"></i>
    					Purple
  					</label>
                 	<label class="mdui-radio mdui-col mdui-text-color-deep-purple" onclick="setPrimaryTheme('deep-purple')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemedeep-purple"/>
    					<i class="mdui-radio-icon"></i>
    					Deep-Purple
  					</label>
                 	<label class="mdui-radio mdui-col mdui-text-color-indigo" onclick="setPrimaryTheme('indigo')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemeindigo"/>
    					<i class="mdui-radio-icon"></i>
    					Indigo
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-blue" onclick="setPrimaryTheme('blue')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemeblue"/>
    					<i class="mdui-radio-icon"></i>
    					Blue
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-light-blue" onclick="setPrimaryTheme('light-blue')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemelight-blue"/>
    					<i class="mdui-radio-icon"></i>
    					Light-Blue
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-cyan" onclick="setPrimaryTheme('cyan')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemecyan"/>
    					<i class="mdui-radio-icon"></i>
    					Cyan
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-teal" onclick="setPrimaryTheme('teal')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemeteal"/>
    					<i class="mdui-radio-icon"></i>
    					Teal
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-green" onclick="setPrimaryTheme('green')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemegreen"/>
    					<i class="mdui-radio-icon"></i>
    					Green
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-light-green" onclick="setPrimaryTheme('light-green')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemelight-green"/>
    					<i class="mdui-radio-icon"></i>
    					Light-Green
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-lime" onclick="setPrimaryTheme('lime')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemelime"/>
    					<i class="mdui-radio-icon"></i>
    					Lime
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-yellow" onclick="setPrimaryTheme('yellow')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemeyellow"/>
    					<i class="mdui-radio-icon"></i>
    					Yellow
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-amber" onclick="setPrimaryTheme('amber')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemeamber"/>
    					<i class="mdui-radio-icon"></i>
    					Amber
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-orange" onclick="setPrimaryTheme('orange')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemeorange"/>
    					<i class="mdui-radio-icon"></i>
    					Orange
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-deep-orange" onclick="setPrimaryTheme('deep-orange')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemedeep-orange"/>
    					<i class="mdui-radio-icon"></i>
    					Deep-Orange
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-brown" onclick="setPrimaryTheme('brown')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemebrown"/>
    					<i class="mdui-radio-icon"></i>
    					Brown
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-grey" onclick="setPrimaryTheme('grey')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemegrey"/>
    					<i class="mdui-radio-icon"></i>
    					Grey
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-blue-grey" onclick="setPrimaryTheme('blue-grey')">
    					<input type="radio" name="setPrimaryTheme" id="setPrimaryThemeblue-grey"/>
    					<i class="mdui-radio-icon"></i>
    					Blue-Grey
  					</label>
               </div>
            </form>
            <p style="font-size: 16px;">强调色</p>
            <form>
            	<div class="mdui-row-xs-2 mdui-row-sm-3 mdui-row-md-4 mdui-row-lg-5">
               		<label class="mdui-radio mdui-col mdui-text-color-red" onclick="setAccentTheme('red')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemered"/>
    					<i class="mdui-radio-icon"></i>
    					Red
  					</label>
                 	<label class="mdui-radio mdui-col mdui-text-color-pink" onclick="setAccentTheme('pink')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemepink"/>
    					<i class="mdui-radio-icon"></i>
    					Pink
  					</label>
                 	<label class="mdui-radio mdui-col mdui-text-color-purple" onclick="setAccentTheme('purple')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemepurple"/>
    					<i class="mdui-radio-icon"></i>
    					Purple
  					</label>
                 	<label class="mdui-radio mdui-col mdui-text-color-deep-purple" onclick="setAccentTheme('deep-purple')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemedeep-purple"/>
    					<i class="mdui-radio-icon"></i>
    					Deep-Purple
  					</label>
                 	<label class="mdui-radio mdui-col mdui-text-color-indigo" onclick="setAccentTheme('indigo')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemeindigo"/>
    					<i class="mdui-radio-icon"></i>
    					Indigo
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-blue" onclick="setAccentTheme('blue')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemeblue"/>
    					<i class="mdui-radio-icon"></i>
    					Blue
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-light-blue" onclick="setAccentTheme('light-blue')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemelight-blue"/>
    					<i class="mdui-radio-icon"></i>
    					Light-Blue
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-cyan" onclick="setAccentTheme('cyan')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemecyan"/>
    					<i class="mdui-radio-icon"></i>
    					Cyan
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-teal" onclick="setAccentTheme('teal')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemeteal"/>
    					<i class="mdui-radio-icon"></i>
    					Teal
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-green" onclick="setAccentTheme('green')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemegreen"/>
    					<i class="mdui-radio-icon"></i>
    					Green
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-light-green" onclick="setAccentTheme('light-green')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemelight-green"/>
    					<i class="mdui-radio-icon"></i>
    					Light-Green
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-lime" onclick="setAccentTheme('lime')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemelime"/>
    					<i class="mdui-radio-icon"></i>
    					Lime
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-yellow" onclick="setAccentTheme('yellow')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemeyellow"/>
    					<i class="mdui-radio-icon"></i>
    					Yellow
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-amber" onclick="setAccentTheme('amber')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemeamber"/>
    					<i class="mdui-radio-icon"></i>
    					Amber
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-orange" onclick="setAccentTheme('orange')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemeorange"/>
    					<i class="mdui-radio-icon"></i>
    					Orange
  					</label>
  					<label class="mdui-radio mdui-col mdui-text-color-deep-orange" onclick="setAccentTheme('deep-orange')">
    					<input type="radio" name="setAccentTheme" id="setAccentThemedeep-orange"/>
    					<i class="mdui-radio-icon"></i>
    					Deep-Orange
  					</label>
  					<br><br>
               </div>
            </form>
        </div>
        <div class="mdui-dialog-actions">
       		<div class="mdui-btn radius waves-circle" style="margin-bottom: 64px;width: 128px;" onclick="resetTheme()" mdui-dialog-close>恢复默认设置</div>
        	<div class="mdui-btn radius waves-circle" style="margin-bottom: 64px;" mdui-dialog-close>确定</div>
        </div>
    </div>
</div>
</div>